// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/vite/dist/node/index.js";
import vue from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Icons from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/unplugin-icons/dist/vite.js";
import IconsResolver from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/unplugin-icons/dist/resolver.js";
import AutoImport from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/unplugin-vue-components/dist/vite.js";
import { ElementPlusResolver } from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/unplugin-vue-components/dist/resolvers.js";
import { NodeGlobalsPolyfillPlugin } from "file:///E:/Desktop/Vue/Carbon/CarbonWeb/node_modules/@esbuild-plugins/node-globals-polyfill/dist/index.js";
var __vite_injected_original_import_meta_url = "file:///E:/Desktop/Vue/Carbon/CarbonWeb/vite.config.ts";
var vite_config_default = defineConfig({
  optimizeDeps: {
    esbuildOptions: {
      // Node.js global to browser globalThis
      define: {
        global: "globalThis"
      },
      // Enable esbuild polyfill plugins
      plugins: [
        NodeGlobalsPolyfillPlugin({
          process: true,
          buffer: true
        })
      ]
    }
  },
  plugins: [
    vue(),
    AutoImport({
      include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
      imports: ["vue", "vue-router", "pinia", "@vueuse/core"],
      resolvers: [
        ElementPlusResolver(),
        // Auto import icon components
        // 自动导入图标组件
        IconsResolver({
          prefix: "Icon"
        })
      ],
      //注意这个配置和src同级
      dts: "./auto-imports.d.ts"
    }),
    Components({
      resolvers: [
        // Auto register icon components
        // 自动注册图标组件
        IconsResolver({
          enabledCollections: ["ep"]
        }),
        // Auto register Element Plus components
        // 自动导入 Element Plus 组件
        ElementPlusResolver()
      ],
      dts: "./component.d.ts"
    }),
    Icons({
      autoInstall: true
    })
  ],
  base: "./",
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url)),
      stream: "stream-browserify",
      crypto: "crypto-browserify",
      assert: "assert"
    },
    extensions: [".js", ".ts", ".jsx", ".tsx", ".json", ".vue"]
  },
  server: {
    host: "localhost",
    // 指定服务器主机名
    port: 5173,
    // 指定服务器端口
    hmr: true,
    // 开启热更新
    open: true,
    // 在服务器启动时自动在浏览器中打开应用程序
    proxy: {
      "/api": {
        target: "http://192.168.80.100:5002",
        changeOrigin: true,
        ws: true,
        rewrite: (path) => path.replace(/^api/, "")
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJFOlxcXFxEZXNrdG9wXFxcXFZ1ZVxcXFxDYXJib25cXFxcQ2FyYm9uV2ViXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJFOlxcXFxEZXNrdG9wXFxcXFZ1ZVxcXFxDYXJib25cXFxcQ2FyYm9uV2ViXFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9FOi9EZXNrdG9wL1Z1ZS9DYXJib24vQ2FyYm9uV2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXG5cbmltcG9ydCB7IGRlZmluZUNvbmZpZyB9IGZyb20gJ3ZpdGUnXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvc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